home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Champak 29
/
Volume 29 - JOGO DISK .iso
/
Games
/
jet_pac_stan.swf
/
scripts
/
frame_62
/
DoAction.as
Wrap
Text File
|
2006-11-13
|
7KB
|
231 lines
0 >= Hinert ? 0 : (Hinert -= 0.2);
Hinert >= 0 ? 0 : (Hinert += 0.2);
hitReady++;
if(_root.MouseDown == true)
{
smokeOK = true;
if(smokeOK == true and _root.gameDetail == "high")
{
duplicateMovieClip("smoke","smoke" + smLev,16384 + smLev);
this["smoke" + smLev]._x = player._x;
this["smoke" + smLev]._y = player._y + 20;
this["smoke" + smLev].smokesource.smokesingle.gotoAndStop(random(6));
smLev++;
100 >= smLev ? 0 : (smLev = 0);
}
fuel -= 0.12;
doFuel();
fallAmm -= thrustPower;
_root.soundOn != 1 ? 0 : SFXjet.gotoAndStop(2);
player.jetPack.gotoAndStop(2);
}
else
{
_root.soundOn != 1 ? 0 : SFXjet.gotoAndStop(3);
player.jetPack.gotoAndStop(1);
}
if(gotBeyonce == true)
{
beyonce._x = player._x + 10;
beyonce._y = player._y - 10;
}
if(playOn == true)
{
if(level == 13)
{
beyonce.gotoAndStop(1);
}
if(player.hitPoints.hitTest(beyonce._x,beyonce._y,true) == true and level == 13 and gotBeyonce == false)
{
gotBeyonce = true;
gotKey1 = true;
gotKey2 = true;
gotKey3 = true;
bossManActive = true;
}
if(bossManActive == true)
{
bossManCount++;
50 + random(50) >= bossManCount ? 0 : (bossManCount = 0, bossStatus != "chase" ? (bossStatus = "chase") : (bossStatus = "stupid", xEnemyM = yEnemyM = random(150) - 55));
if(bossStatus == "chase")
{
xEnemyM = player._x - xEnemy;
yEnemyM = player._y - yEnemy;
scenery.rock.enemy._x += xEnemyM / 50;
scenery.rock.enemy._y += yEnemyM / 50;
scenery.rock.enemy._rotation >= 50 ? 0 : (scenery.rock.enemy._rotation -= yEnemyM / 100);
}
if(bossStatus == "stupid")
{
scenery.rock.enemy._x += xEnemyM / 50;
scenery.rock.enemy._y += yEnemyM / 50;
-50 >= scenery.rock.enemy._rotation ? 0 : (scenery.rock.enemy._rotation += yEnemyM / 100);
}
}
_root.MouseDown = false;
if(player._currentFrame < 40)
{
if(Key.isDown(39))
{
player.nextFrame();
Hinert += 0.7;
}
else if(Key.isDown(37))
{
player.prevFrame();
Hinert -= 0.7;
}
else
{
16 >= player._currentFrame ? 0 : player.prevFrame();
player._currentFrame >= 17 ? 0 : player.nextFrame();
}
}
!(Key.isDown(32) or Key.isDown(38)) ? 0 : (_root.MouseDown = true);
shitCount++;
if(Key.isDown(9) and 10 < shitCount)
{
fuel = 100;
shitCount = 0;
status = "nextLevel";
}
if(scenery.rock.fuelPod.hitTest(player.hitPoints) == true)
{
if(_root.fuelAnimating != true)
{
_root.soundOn != 1 ? 0 : SFX3ting.gotoAndPlay(2);
scenery.rock.fuelPod.gotoAndPlay(2);
fuel += 20;
100 >= fuel ? 0 : (fuel = 100);
}
}
else if(scenery.rock.key.hitTest(player.hitPoints) == true)
{
gotKey1 = true;
scenery.rock.key.gotoAndStop("collected");
}
else if(scenery.rock.kkey.hitTest(player.hitPoints) == true)
{
gotKey2 = true;
scenery.rock.kkey.gotoAndStop("collected");
}
else if(scenery.rock.kkkey.hitTest(player.hitPoints) == true)
{
gotKey3 = true;
scenery.rock.kkkey.gotoAndStop("collected");
}
else if(_root.doorOpen == true and scenery.rock.door.hitTest(_root.hitP1x,_root.hitP1y,true) == true)
{
if(doorOpen == true)
{
_root.MouseDown = false;
playOn = false;
status = "intoDoor";
timeBonus = int(fuel);
}
}
else if(scenery.rock.lasers2.hitTest(_root.hitP1x,_root.hitP1y,true) == true)
{
player.gotoAndPlay("laserHit");
fuel -= 2;
fuelDisp.fuelRod.gotoAndPlay(2);
doFuel();
}
else if(scenery.rock.hitTest(_root.hitP1x,_root.hitP1y,true) == true)
{
bounceY = 0;
_root.checkPlayerPoints = true;
HorizMove = 0;
VertMove = 0;
scenery.rock.hitTest(_root.MatCheck1x,_root.MatCheck1y,true) != true ? 0 : (VertMove += 2);
scenery.rock.hitTest(_root.MatCheck2x,_root.MatCheck2y,true) != true ? 0 : (HorizMove -= 2);
scenery.rock.hitTest(_root.MatCheck3x,_root.MatCheck3y,true) != true ? 0 : (VertMove -= 2);
scenery.rock.hitTest(_root.MatCheck4x,_root.MatCheck4y,true) != true ? 0 : (HorizMove += 2);
scenery.rock.hitTest(_root.MatCheck5x,_root.MatCheck5y,true) != true ? 0 : (VertMove += 2, HorizMove -= 2);
scenery.rock.hitTest(_root.MatCheck6x,_root.MatCheck6y,true) != true ? 0 : (VertMove -= 2, HorizMove -= 2);
scenery.rock.hitTest(_root.MatCheck7x,_root.MatCheck7y,true) != true ? 0 : (VertMove -= 2, HorizMove += 2);
scenery.rock.hitTest(_root.MatCheck8x,_root.MatCheck8y,true) != true ? 0 : (VertMove += 2, HorizMove += 2);
Hinert = HorizMove;
fallAmm = VertMove;
player.gotoAndPlay("hit");
if(hitDelay < hitReady)
{
fuel -= 3;
hitReady = 0;
fuelDisp.fuelRod.gotoAndPlay(2);
doFuel();
}
}
fallAmm += gravity;
player._y += fallAmm;
speedLimit >= fallAmm ? 0 : (fallAmm = speedLimit);
fallAmm >= - speedLimit ? 0 : (fallAmm = - speedLimit);
player._x += Hinert;
speedLimit >= Hinert ? 0 : (Hinert = speedLimit);
Hinert >= - speedLimit ? 0 : (Hinert = - speedLimit);
}
if(status == "intoDoor")
{
player.gotoAndPlay("shrink");
gotBeyonce != true ? 0 : beyonce.gotoAndPlay("shrink");
status = "intoDoor2";
endOfLevelCount = 0;
}
if(status == "intoDoor2")
{
endOfLevelCount++;
player._x += (_root.xEnd - player._x) / 25;
player._y += (_root.yEnd - player._y) / 25;
if(20 < endOfLevelCount)
{
nextLevel.gotoAndPlay(2);
status = "";
}
}
if(status == "nextLevel")
{
status = "";
reset();
direction != "in" ? level-- : level++;
direction != "in" ? (_root.levelDisplay = 26 - level) : (_root.levelDisplay = level);
gotKey1 = false;
gotKey2 = false;
gotKey3 = false;
scenery.rock.key.gotoAndStop(1);
scenery.rock.kkey.gotoAndStop(1);
scenery.rock.kkkey.gotoAndStop(1);
scenery.rock.fuelPod.gotoAndStop(1);
scenery.nextFrame();
scenery.play();
player._visible = false;
beyonce._visible = false;
}
if(playOn == true and MovH + 50 < player._y or player._y < -50 or MovW + 100 < player._x or player._x < -100)
{
reset();
}
if(outOfFuel == true)
{
_root.gameover = "ready";
gameOverMC.gotoAndPlay(2);
outOfFuel = null;
_root.MouseDown = false;
playOn = false;
gotoAndPlay(70);
}
if(_root.demo == 1 and 7000 < score and playOn == true)
{
playOn = false;
demoGameoverMC.gotoAndPlay(2);
gotoAndPlay(70);
}
if(gotKey1 == true and gotKey2 == true and gotKey3 == true)
{
gotKey1 = "";
gotKey2 = "";
gotKey3 = "";
KeyGot = true;
scenery.rock.door.gotoAndPlay(2);
_root.levelDisplay != 25 ? 0 : scenery.rock.finalDoor.gotoAndPlay(2);
}